<include file="public/layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default;">
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <div class="subject">
        <h3>酒厂体验管理</h3>
        <h5>酒厂体验添加与管理</h5>
      </div>
    </div>
  </div>
  <div id="explanation" class="explanation">
    <div id="checkZoom" class="title"><i class="fa fa-lightbulb-o"></i>
      <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
      <span title="收起提示" id="explanationZoom"></span>
    </div>
    <ul>
      <li>温馨提示：删除活动，同时会删除该活动已报名人员数据，请谨慎操作！</li>
    </ul>
  </div>
  <form method="post">
    <input type="hidden" value="ok" name="form_submit">
    <div class="flexigrid">
      <div class="mDiv">
        <div class="ftitle">
          <h3>酒厂体验活动列表</h3>
          <h5></h5>
        </div>
      </div>
      <div class="hDiv">
        <div class="hDivBox">
          <table cellspacing="0" cellpadding="0">
            <thead>
              <tr>
                <th align="center" axis="col0" class="sign">
                  <div style="text-align: center; width: 24px;"><i class="ico-check"></i></div>
                </th>
                <th align="center" axis="col2"><div style="text-align: center; width: 150px;">酒厂名称</div></th>
                <th align="center" axis="col3"><div style="text-align: center; width: 150px;">报名开始时间</div></th>
                <th align="center" axis="col4"><div style="text-align: center; width: 150px;">体验时间</div></th>
                <th align="center" axis="col5"><div style="text-align: center; width: 150px;">报名人数</div></th>
                <th align="center" axis="col6"><div style="text-align: center; width: 150px;">状态</div></th> 
                <th align="center" axis="col1" class="handle"><div style="text-align: center; width: 150px;">操作</div></th>
                <th axis="col10"><div></div></th>
              </tr>
            </thead>
          </table>
        </div>
      </div>
      <div class="tDiv">
        <div class="tDiv2">
         <a href="{:U('Cellar/addeditTaste')}">
          <div class="fbutton">
            <div title="新增分类" class="add">
              <span><i class="fa fa-plus"></i>添加活动</span>
            </div>
          </div>
         </a> 
        </div>
        <div style="clear:both"></div>
      </div>      
      <div style="height: auto;" class="bDiv">
        <table cellspacing="0" cellpadding="0" border="0" id="article_cat_table" class="flex-table autoht">
          <tbody id="treet1">
          <foreach name="tastes" item="vo" key="k">	
          <tr>
              <td class="sign">
                <div style="text-align: center; width: 24px;"> 
                	<i class="ico-check"></i>                    
                </div> 
              </td>
              <td class="sort">
	              <div style="text-align: center; width: 150px;">{$vo.name}</div>
              </td>
              <td class="name">
                <div style="text-align: center; width: 150px;">{$vo.signtime|date="Y-m-d H:i:s",###}</div>
              </td>
              <td class="name">
                <div style="text-align:center; width: 150px;">{$vo.tastetime|date="Y-m-d H:i:s",###}</div>
              </td>
              <td class="name">
                <div style="text-align: center; width: 150px;">
0
                </div>
              </td>
                <td align="center" class="">
                  <div style="text-align: center; width: 150px;">
                  	<if $vo.state == 0>正在报名中</if>
	                	<if $vo.state == 1>正在体验中</if>
	                	<if $vo.state == 2>体验活动结束</if>
                  </div>
                </td>                                              
              <td class="handle">
                <div style="text-align:center;   min-width:150px !important; max-width:inherit !important;">
                  <span class="btn"><em><i class="fa fa-cog"></i>操作<i class="arrow"></i></em>
                  <ul>
                  	<li><a href="#">预览报名页面</a></li>
                    <li><a href="{:U('Cellar/addeditTaste',array('id'=>$vo.id))}">编辑活动信息</a></li> 
                    <li><a href="javascript:del('{:U('Cellar/delTaste',array('id'=>$vo.id))}');">删除当前活动</a></li>
                    <li><a href="{:U('Cellar/tasterManage',array('tid'=>$vo.id))}">查看报名信息</a></li>
                  </ul>
                  </span>
                </div>
              </td>                                       
              <td style="width: 100%;">
                <div>&nbsp;</div>
              </td>
            </tr> 
          </foreach>  
          </tbody>
        </table>        
      </div>
      {$pager}
    </div>
</div>
  <script>
      $(document).ready(function(){	
    	  // 点击分页触发的事件
          $(".pagination  a").click(function(){
              cur_page = $(this).data('p');
              location.href = "/admin/cellar/wineryTaste/p/"+cur_page;
          });
	    // 表格行点击选中切换
	    $('.bDiv > table>tbody >tr').click(function(){
		    $(this).toggleClass('trSelected');
		});				
	 });
  
     // 点击展开 收缩节点
     function treeClicked(obj,cat_id,parent_id_path){

		 var src = $(obj).attr('src');
		 if(src == '/public/static/images/tv-expandable.gif')
		 {
			 $(".parent_id_"+cat_id).show();
			 $(obj).attr('src','/public/static/images/tv-collapsable-last.gif');
		 }else{			 
		     $("tr[parent_id_path^='"+parent_id_path+"_']").hide().find('img').attr('src','/public/static/images/tv-expandable.gif');
			 $(obj).attr('src','/public/static/images/tv-expandable.gif');			 
			 
		 }		 
	 }  	
  </script>
</body>
</html>
